Skip to content

Copy http headers from main controller to sub controllers#3213

Open
chenBright wants to merge 1 commit intoapache:masterfrom
chenBright:parallel_channel_header
Open

Copy http headers from main controller to sub controllers#3213
chenBright wants to merge 1 commit intoapache:masterfrom
chenBright:parallel_channel_header

Conversation

@chenBright
Copy link
Contributor

What problem does this PR solve?

Issue Number: resolve #3211

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects:

  • Breaking backward compatibility:


Check List:

// Forward request attachment to the subcall
sub_cntl->request_attachment().append(_main_cntl->request_attachment());
sub_cntl->http_request() = _main_cntl->http_request();
if (PROTOCOL_HTTP == _main_cntl->request_protocol()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this can also apply to PROTOCOL_H2

ParallelChannelDone::SubDone* sd = d->sub_done(j++);
// Forward the attachment to each sub call
sd->cntl.request_attachment().append(cntl->request_attachment());
if (PROTOCOL_HTTP == cntl->request_protocol()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current ParallelChannel is not friendly to http protocol if user want to set different http request params for different sub call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParallelChannel似乎无法设置子controller的http header

2 participants